#include "Ray.h"

Ray::Ray()
{
}

Ray::Ray(const Point3& origin, const Vec3& direction) : orig(origin),
dir(direction)
{
}

Ray::Ray(const Point3& origin, const Vec3& direction, double time): orig(origin),
dir(direction),
tm(time)
{
}

Point3 Ray::at(double t) const
{
	return orig + t * dir;
}

double Ray::time() const
{
	return  tm;
}
